{# SPDX-FileCopyrightText: © 2023 Siemens AG

   SPDX-License-Identifier: FSFAP
#}
<script src="scripts/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<p>
    {{ "NOTE: All the below details are displayed irrespective of groups."|trans }}
</p>
<form method='post'>
  <table border="0" align="center" cellpadding="5">
    <tr>
      <td>
        <label for="selectfolderid">
        {{ "Size of folder "|trans }}
        </label>
        <select name="selectfolderid" id="selectfolderid" onChange="window.location.href='{{ onchangeURI }}' + this.value" class="ui-render-select2">
        {{ folderListOption }} FolderListOption(-1, 0, 1, $folderId);
        </select>
      </td>
      <td align='center'>
        {{ "is"|trans }} {{ wholeFolderSize }}
      </td>
      <td>
        <form method="GET" action="{{ traceback }}" style="display: inline-block;">
          <input type="hidden" name="mod" value="{{ pluginName }}">
          <input type="hidden" name="export" value="csv">
          <input type="hidden" name="folder" value="{{ currentFolderId }}">
          <button type="submit" class="btn btn-default btn-sm">
            <i class="fa fa-file-csv"></i> {{ "Export CSV"|trans }}
          </button>
        </form>

        <form method="GET" action="{{ traceback }}" style="display: inline-block; margin-left: 8px;">
          <input type="hidden" name="mod" value="{{ pluginName }}">
          <input type="hidden" name="export" value="json">
          <input type="hidden" name="folder" value="{{ currentFolderId }}">
          <button type="submit" class="btn btn-default btn-sm">
            <i class="fa fa-file-code"></i> {{ "Export JSON"|trans }}
          </button>
        </form>
      </td>
    </tr>
  </table>
  <div style="clear:both;"></div>
  <table border="1" align="left" id="folderWiseuploadTable" style="width:30%" class="table">
  <thead>
    <tr>
      <th>
        {{ "Upload id"|trans }}
      </th>
      <th>
        {{ "Upload name"|trans }}
      </th>
      <th>
        {{ "Upload size"|trans }}
      </th>
      <th>
        {{ "Clearing duration"|trans }}
      </th>
      <th>
        {{ "Upload date"|trans }}
      </th>
      <th>
        {{ "Upload status"|trans }}
      </th>
    </tr>
  </thead>
  <tbody>
    {{ tableVars }}
  </tbody>
  </table>
</form>
<script type="text/javascript">
  $('#folderWiseuploadTable').DataTable();
</script>
